package com.zero.mxshengadmin.modules.website.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zero.mxshengadmin.modules.website.entity.WebsiteNewsEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * Created by aicaikeji on 2019/4/3.
 */
@Mapper
public interface WebsiteNewsDao extends BaseMapper<WebsiteNewsEntity> {
    /**
     * 添加资讯
     * @param entity
     * @return
     */
    int addNews(WebsiteNewsEntity entity);

    /**
     * 查询资讯详情
     * @param entity
     * @return
     */
    WebsiteNewsEntity findNewsInfo(WebsiteNewsEntity entity);

    /**
     * 更新账户信息
     * @param entity
     * @return
     */
    int updateNewsInfo(WebsiteNewsEntity entity);

    /**
     * 删除账户信息
     * @param entity
     * @return
     */
    int deleteNews(WebsiteNewsEntity entity);

    /**
     * 查询文章条数
     * @param entity
     * @return
     */
    long findNewsCount(WebsiteNewsEntity entity);

    /**
     * 查询资讯列表
     * @param map
     * @return
     */
    List<WebsiteNewsEntity> findNewsList(Map<String, Object> map);
}
